package com.imooc.course.controller;

import com.imooc.course.entity.CoursePrice;
import com.imooc.course.service.CoursePriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: spring-cloud-course
 * @description:
 * @author: CY
 * @create: 2021-06-28 22:04
 **/
@RestController
public class CoursePriceController {

    @Autowired
    CoursePriceService coursePriceService;

    @GetMapping("/")
    public Integer getCoursePrice(Integer courseId){
        CoursePrice coursePrice = coursePriceService.getCoursePrice(courseId);
        return coursePrice.getCoursePrice();
    }
}
